#include <algorithm>
#include <vector>
#include <string>
#include <iostream>

#define MAX_SIZE 10000

using namespace std;

int main() {
	string str;
	cin >> str;
	int str_len = str.length();
	vector<string> strs; 

	for (int i = 0; i < str_len; ++i) {
		strs.push_back(str.substr(i, str_len));
	}

	sort(strs.begin(), strs.end());
	for (string it: strs) {
		cout << it << "\n";
	}
	cout << endl;


	return 0;
}